package org.hry.file;

import lombok.Getter;
import lombok.Setter;

import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;

/**
 * @Desc
 * @Author houruiyang
 * @Date 2021/9/9
 **/
public class AtomicIntegerFieldUpdaterTest {


    public volatile int num;

    AtomicIntegerFieldUpdater<AtomicIntegerFieldUpdaterTest> fieldUpdater =
            AtomicIntegerFieldUpdater.newUpdater(AtomicIntegerFieldUpdaterTest.class, "num");


    public void a (AtomicIntegerFieldUpdaterTest test) {

        fieldUpdater.getAndIncrement(test);

    }

}
